Skip to content
This repository has been archived by the owner on Oct 2, 2020. It is now read-only.

Add SAM D21 family #2336

Merged
merged 10 commits into from
Mar 19, 2020
Merged

Add SAM D21 family #2336

merged 10 commits into from
Mar 19, 2020

Conversation

jordiorlando
Copy link
Contributor

@jordiorlando jordiorlando commented Nov 26, 2019

Add Microchip SAM D21/DA1 family (everything except the chip-scale packages).

Datasheet

  • ATSAMD21E15A-A ATSAMD21E15A-A
  • ATSAMD21E15A-M ATSAMD21E15A-M
  • ATSAMD21E15L-A ATSAMD21E15L-A
  • ATSAMD21E15L-M ATSAMD21E15L-M
  • ATSAMD21G15A-A ATSAMD21G15A-A
  • ATSAMD21G15A-M ATSAMD21G15A-M
  • ATSAMD21G16L-M ATSAMD21G16L-M
  • ATSAMD21J15A-A ATSAMD21J15A-A
  • ATSAMD21J15A-M ATSAMD21J15A-M
  • ATSAMD21J15B-C ATSAMD21J15B-C

All contributions to the kicad library must follow the KiCad library convention

Thanks for creating a pull request to contribute to the KiCad libraries! To speed up integration of your PR, please check the following items:

  • Provide a URL to a datasheet for the symbol(s) you are contributing
  • An example screenshot image is very helpful
  • Ensure that the associated footprints match the official footprint library
    • A new fitting footprint must be submitted if the library does not yet contain one.
  • If there are matching footprint PRs, provide link(s) as appropriate
  • Check the output of the Travis automated check scripts - fix any errors as required
  • Give a reason behind any intentional library convention rule violation.

@antoniovazquezblanco antoniovazquezblanco added Addition Adds new symbols to library Pending reviewer A pull request waiting for a reviewer labels Nov 26, 2019
@cpresser
Copy link
Contributor

cpresser commented Nov 26, 2019

This seems to be a duplicate of #2308
I have not taken a closer look at either PR yet, so right now I have no clue if one is 'better' than another.
We had a addtion of other SAMD parts recently (#2118). Some of the stylistic questions have already been discussed there. I think we should them also apply here, minus the bikeshedding :)

edit: fixed the link to the other PR.

@cpresser cpresser added the Duplicate Already reported label Nov 26, 2019
@cpresser cpresser mentioned this pull request Nov 26, 2019
6 tasks
@jordiorlando
Copy link
Contributor Author

jordiorlando commented Nov 26, 2019

Oops, I seem to have missed #2130.

  • Mine drops the "UT" from the part numbers because they refer only to packaging/temp. This is also in line with Add ATSAMD51J18/19/20A #2118 (SAMD51).
  • I also made sure that all the symbols are drop-in compatible with each other. Meaning, all the pins are in the same locations regardless of how many actually exist on the package.
  • I chose not to remove the existing ATSAMD21G18A-AUT symbol from the library so as not to break any existing designs. It should probably be deprecated and marked for removal in 6.x.
  • I also added the BGA symbols.

@jordiorlando jordiorlando force-pushed the SAMD21 branch 2 times, most recently from 3d86021 to 94135c0 Compare November 29, 2019 07:14
@cpresser
Copy link
Contributor

I will most likely review and hopefully merge this soon.
Can you please do incremental commits starting from now on? That helps me to track changes/things that I already reviewed.

@jordiorlando
Copy link
Contributor Author

Sure thing! In past repos people have preferred force-pushing so I got in the habit of that. I just realized my pin lengths are 200mil when they should be 100mil, I'll fix that in the next couple hours.

@jordiorlando
Copy link
Contributor Author

@cpresser fixed the pin lengths

@jordiorlando jordiorlando force-pushed the SAMD21 branch 2 times, most recently from bd953d4 to a008773 Compare December 11, 2019 23:27
@cpresser cpresser self-assigned this Dec 12, 2019
@cpresser cpresser removed the Pending reviewer A pull request waiting for a reviewer label Dec 12, 2019
@jordiorlando
Copy link
Contributor Author

@cpresser any updates?

@cpresser
Copy link
Contributor

Sorry for the huge delay. I am quite busy with moving our Hackerspace to a new location. This takes a insane amount of time out of my budget.
Anyway, I will make some time for the pending PRs on Github soon.

MCU_Microchip_SAMD.dcm Outdated Show resolved Hide resolved
@cpresser
Copy link
Contributor

cpresser commented Mar 13, 2020

I will update this post with my review results. So please check if there are any edits.

I am not sure if we should include aliases for the device variants B.
Some of the variants have functional changes, others not. So I am not quite sure how to apply S2.2.

  • The description of different variants (A, B, L) should differ. Currently they are the same. This applies to multiple parts/aliases. I will not add this as a checkbox item for each part.
  • Also most aliases that I checked have the wrong amount of SRAM. It seems like the description always says 32K which is only correct for the ATSAMD21?18 variant.

Those are the new symbols:

  • TQFP-32
    • ATSAMD21E15A-A
      • Pin names and numbers are okay
      • Footprint and filters
    • ATSAMD21E15L-A
      • VDDIO pin not on same position as in A-Variant, thus not a drop-in-replacement This was wrong. See below.
      • Pin names and numbers are okay
      • Footprint and filters
  • QFN-32
    • ATSAMD21E15A-M
    • ATSAMD21E15L-M
      • Pin names and numbers identical to TQFP part
      • VDDIO pin not on same position as in A-Variant, thus not a drop-in-replacement This was wrong. See below.
  • TQFP-48
    • ATSAMD21G15A-A
      • Pin names and numbers are okay
      • VDDIO pins should be un-stacked since each one needs dedicated decoupling
      • Footprint and filters
  • QFN-48
  • TQFP-64
    • ATSAMD21J15A-A
      • VDDIO-Pin-Stack as above
      • Pin names and numbers
      • Footprint and filters
  • QFN-64
    • VDDIO-Pin-Stack as above
    • Pin names and numbers
    • Footprint and filters
  • UFBGA-64
    • ATSAMD21J15B-C
      • Pin names and numbers (Ball H4 has the wrong color on in section 5.1.2)
      • VDDIO-Pin-Stack as above
      • Footprint and filters

I did not check each alias since most of the descriptions need improvement.
I will take a look at them again once you reworked them.

@cpresser
Copy link
Contributor

@0xdec The review is done for now. I will do another round once you do some fixes. Overall this is a really good contribution. There are only minor issues. Keep up the good work!

@jordiorlando
Copy link
Contributor Author

jordiorlando commented Mar 14, 2020

I am not sure if we should include aliases for the device variants B.
Some of the variants have functional changes, others not. So I am not quite sure how to apply S2.2. Anyway, the description of different parts should differ. Currently they are the same. This applies to multiple parts/aliases. I will not add this as a checkbox item for each part.

I feel as though the variants have fairly specific changes that would require reading the datasheet, but don't really change the core functionality of the device. The symbol is unchanged for most of the variants (L excluded), so it seems to me that there's no reason to make an entirely new identical symbol.

The descriptions for each variant are rather verbose:

  • A = Default Variant
  • B = Added RWW support for 32 KB and 64 KB memory options
  • C = Silicon revision F for WLCSP45 package option
  • L = Pinout optimized for Analog and PWM
  • D = Silicon Revision G with RWW Support in 128KB memory options

Do you think it's worth it to try to simplify this description for the variant description? Or just include the variant name in the description?

  * `ATSAMD21E15L-A` and  `ATSAMD21E15L-M`
    
    * [ ]  `VDDIO` pin not on same position as in `A`-Variant, thus not a drop-in-replacement

This is because the A variant does not have pin VDDIO, only VDDIN. These pins have different functions, but their position is consistent if you look at e.g. ATSAMD21G15A-A, which they are drop-in compatible with.

  * `ATSAMD21G15A-A`
    
    * [x]  `VDDIO` pins should be unstacked since each one needs dedicated decoupling

Done, although it looks kinda ugly. Maybe the symbol body should be widened...

@jordiorlando
Copy link
Contributor Author

@cpresser oops looks like I made those changes while you updated your review...will look at the new stuff now. And thank you, I will!

@jordiorlando
Copy link
Contributor Author

@cpresser I think I addressed all the issues

@jordiorlando
Copy link
Contributor Author

As for the discussion about variant B, it seems that variants B, C, and D are simply silicon revisions that add RWW support to sections of the flash memory. I would argue that this is the same level of functional difference as different SRAM or FLASH sizes, so it shouldn't warrant a new symbol. The L variant is a bit different, it seems to contain the same silicon changes that add RWW support, as well as change which peripherals are available, and the device pinout.

@jordiorlando
Copy link
Contributor Author

Added the SAM DA1 family as well, since they're almost identical

@jordiorlando jordiorlando changed the title Add SAM D21 family Add SAM D21/DA1 family Mar 14, 2020
cpresser
cpresser previously approved these changes Mar 15, 2020
@cpresser
Copy link
Contributor

TIL: approving one commit out of 11 marks the whole thing as approved.

Thanks for the changes, they are good:

  • Descriptions (SRAM, Versions)
  • VDDIO vs. VDDIN thanks for the clarification.
  • Unstacking the Pins
  • Why are the DA1 part not aliases as well? They share the same pin-out as the D21!?

To be honest, I would rather have the DA1 parts in a dedicated PR. Now this one is insanely big. Which makes it pretty hard to properly review. Also the force-push is something that makes the review harder - now I have to check which ones of the individual commits was forced.
Please just add commits on top of the first one for future PRs.

@cpresser cpresser dismissed their stale review March 15, 2020 19:58

DA1 parts not checked.

@jordiorlando
Copy link
Contributor Author

I figured DA1 might be a separate PR, even though they're identical. Do you think it would be okay to just have them as aliases? I literally just copied them and changed the descriptions...

As for force-push, sorry about that. In past repos I've been requested to do that whenever I rebase, to avoid a merge commit. All my force-pushes have been only for rebasing on master, but I see your point. Will no longer force push from now on.

@cpresser
Copy link
Contributor

I figured DA1 might be a separate PR, even though they're identical. Do you think it would be okay to just have them as aliases? I literally just copied them and changed the descriptions...

I don't see a reason to not have them as alias. Am I missing something?

Would you undo the last commit in this branch? Then I will merge this one and we can work on the DA1 parts in a dedicated PR. That PR will most likely be trivial since its only aliases.

As for force-push, sorry about that. In past repos I've been requested to do that whenever I rebase, to avoid a merge commit. All my force-pushes have been only for rebasing on master, but I see your point. Will no longer force push from now on.

Actually I prefer re-basing over merging since merging produces ugly commits.
I was not aware that there was a conflict that required re-basing, I must have missed that - sorry.
So go ahead and rebase if required. The important part is to add a comment that explains why the history was changed.

@jordiorlando jordiorlando changed the title Add SAM D21/DA1 family Add SAM D21 family Mar 19, 2020
@jordiorlando
Copy link
Contributor Author

Alias seems fine to me! I'll make a new PR for SAM DA1. Went ahead and un-did the last commit.

And sounds good on rebasing, will remember for future.

@cpresser cpresser merged commit 7f8c4fc into KiCad:master Mar 19, 2020
@cpresser
Copy link
Contributor

Thanks for the good work! 👍

@antoniovazquezblanco antoniovazquezblanco added this to the 5.1.6 milestone Mar 19, 2020
@jordiorlando jordiorlando deleted the SAMD21 branch May 1, 2020 06:13
@jordiorlando jordiorlando mentioned this pull request May 1, 2020
6 tasks
@jordiorlando
Copy link
Contributor Author

@cpresser finally got around to opening a new PR for SAM DA1: #2687

@cpresser cpresser mentioned this pull request Sep 20, 2020
1 task
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Addition Adds new symbols to library Duplicate Already reported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants